package com.istock.state.demo.constants;

public enum ChildOrderStatusEnum {

	/**
	 * 待处理
	 */
	WAIT(1)
	,/**
	 * 处理中
	 */
	PROCESSING(2)
	,/**
	 * 处理成功
	 */
	SUCCESS(3)
	,/**
	 * 处理失败
	 */
	FAIL(4)
	;
	private Integer value;
	
	ChildOrderStatusEnum(Integer value){
		this.value = value;
	}
	
	public Integer getValue() {
		return this.value;
	}
	
	public static ChildOrderStatusEnum findByValue(Integer value) {
		for(ChildOrderStatusEnum state : values()) {
			if(state.getValue() == value) {
				return state;
			}
		}
		return null;
	}
}
